package cn.whit.blog.service;

import java.sql.SQLException;
import java.util.List;

import cn.whit.blog.domain.Vote;
import cn.whit.blog.domain.VoteItem;
import cn.whit.blog.util.DynamicQuery;
import cn.whit.blog.util.PageModel;

public interface VoteItemService {
	VoteItem findById(String id) throws SQLException;
	
	List<VoteItem> findAll() throws SQLException;

	PageModel findByPageAndQuery(int startIndex, int pageSize, DynamicQuery query) throws Exception;
	
	List<VoteItem> findAllWithPageAndQuery(int startIndex, int pageSize, DynamicQuery query) throws Exception;

	int findTotalRecordsAndQuery(DynamicQuery query) throws Exception;

	void save(VoteItem voteItem) throws SQLException;

	void update(VoteItem voteItem) throws SQLException;

	PageModel findByPageAndQuery2(int startIndex, int pageSize, DynamicQuery query) throws Exception;

	VoteItem getById(String id) throws SQLException;

	List<VoteItem> findByUserIdAndVoteId(String id, String voteid) throws SQLException;
}
